package logic

import (
	"cart_srv/internal/svc"
	"cart_srv/model/redis"
	"context"

	"cart_srv/cart"

	"github.com/zeromicro/go-zero/core/logx"
)

type ListCartLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewListCartLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListCartLogic {
	return &ListCartLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *ListCartLogic) ListCart(in *cart.ListCartRequest) (*cart.ListCartResponse, error) {
	redis.ListCart(int(in.UserId), int(in.GoodsId))

	return &cart.ListCartResponse{}, nil
}
